/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sokoban;

import Controller.BordController;
import Model.Level;
import java.awt.Event;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.util.EventListener;

/**
 *
 * @author Bram
 */
public class Sokoban extends JFrame {
    private Level curLevel;
    private BordController bord;
    private Sokoban game;

    public Sokoban() {
        bord = new BordController();
        setSize(10247, 720);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setTitle("Sokoban");
        setLevel(0);
        startGame();
        pack();
    } 
    
    private void startGame(){
        bord.defineWorld(curLevel.getLevel());
        add(bord.getView());
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Sokoban game = new Sokoban();
        game.setVisible(true); 
        
    }
    
    public void setLevel(int levelCode){
        
        curLevel = new Level();
        
        if(levelCode > 0){
            curLevel = new Level(levelCode);
        }
        
    }
}
